import { request } from '../../utils/request';
import { IPage } from '../index';

export interface IOrderBuyInfo {
  goodsId: string;
  goodsName: string;
  account: number;
}

export interface IOrderSelectionInfo {
  id: string;
  username: string;
  orderStatus: string;
  price: number;
  orderTime: string;
  userId: string;
  orderBuyVos: IOrderBuyInfo[];
  avatar: string;
}

export const getOrderSelectList = (data: any) =>
  request<IPage<IOrderSelectionInfo>>({
    url: '/order/list',
    method: 'post',
    data,
  });
